/*
 * @Description: 
 * @Author: mmzhang
 * @Date: 2022-07-14 09:22:27
 * @LastEditTime: 2023-01-06 14:51:19
 */
import dt from '@dt/dt'

function getCooperationType() {
  // let list = dt.dictInfo().channelType.reduce((arr, { children }) => {
  //   if (children) {
  //     for (let item of children) {
  //       if (!arr.find(i => i.key == item.key)) {
  //         arr.push({ key: item.key, value: item.value })
  //       }
  //     }
  //   }
  //   return arr
  // }, [{ key: '', value: '无' }])
  return {
    key: 'cooperationType',
    title: '合作类型',
    select: {
      options: dt.dictInfo().cooperationTypeFinal
    }
  }
}

function options(_this) {
  return [
    getCooperationType(_this),
    {
      key: 'orderState',
      title: '订单状态',
      select: {
        key: 'riskOrderState',
        clearable: true
      }
    },
    {
      key: 'orderCode',
      title: '订单编号',
      placeholder: '请输入认购或签约单编号',
      input: {}
    },
  ]
}

export default {
  options
}